<script>
	import{getInfo} from './api/login/user.js'
	export default {
		onLaunch: function() {
			let token =uni.getStorageSync("token")||'';
			if(token !=''){
				let user = uni.getStorageSync("user");
				this.$store.dispatch('userInfo/GETLOGIN', user)
			}else{
				let user = '';
				this.$store.dispatch('userInfo/GETLOGIN', user)
			}
		},
		onShow: function() {
			let token =uni.getStorageSync("token")||'';
				if(token !=''){
					let user = uni.getStorageSync("user");
					this.$store.dispatch('userInfo/GETLOGIN', user)
				}else{
					let user = '';
					this.$store.dispatch('userInfo/GETLOGIN', user)
				}
			},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "uview-ui/index.scss";
</style>
